package com.wlwk.common.exception;


import com.wlwk.common.exception.menu.RespCode;

/**
 * 功能描述: 自定义异常
 *
 * @auther: ck
 * @date: 2018/8/22 14:33
 */
public class RRException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	private String msg;
	private String code;

	public RRException(String msg) {
		super(msg);
		this.msg = msg;
	}

	public RRException(String msg, Throwable e) {
		super(msg, e);
		this.msg = msg;
	}

	public RRException(String code, String msg) {
		super(msg);
		this.msg = msg;
		this.code = code;
	}

	public RRException(String msg, String code, Throwable e) {
		super(msg, e);
		this.msg = msg;
		this.code = code;
	}

	public RRException(RespCode respCode, Throwable e) {
		super(respCode.getMsg(),e);
		this.code = respCode.getCode();
	}

	public RRException(RespCode respCode) {
		super(respCode.getMsg());
		this.code = respCode.getCode();
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}
